<template>
	<view class="storeDetails" v-if="shop.name">
		<view class="shopJia">
			<view class="shopJiaLeft">
				<view>
					<image src="https://www.kmdj2018.com/Uploads/zfb/shop01.png" mode="aspectFit"></image>
					<text>{{shop.name}}</text>
				</view>
				<view>
					<image src="https://www.kmdj2018.com/Uploads/zfb/shop02.png" mode="aspectFit"></image>
					<text>{{shop.pro_name}}{{shop.city_name}}{{shop.area_name}}{{shop.add_ress}}</text>
				</view>
				<view>
					<image src="https://www.kmdj2018.com/Uploads/zfb/shop03.png" mode="aspectFit"></image>
					<text>{{shop.phone}}</text>
				</view>
			</view>
			<view class="shopJiaRight">
				
			</view>
		</view>
		<view class="storeDetailsS">
			<shop :list="shop.goods"></shop>
		</view>
	</view>
</template>

<script>
	import shop from "@/components/shop/shop.vue"
	export default {
		data() {
			return {
				shop:{}
			};
		},
		onLoad(e) {
			this.init(e.data)
		},
		methods:{
			init(id){
				this.$request("Goods/ShopList", {
					data: {
						id:id
					},
					isLoad: false
				}).then(res => {
					this.shop = res.result
					setTimeout(() => {
						uni.setNavigationBarTitle({
							title: this.shop.name
						});
					}, 200)
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.storeDetailsS {
		padding: 20rpx 32rpx;
	}
	.shopJia {
		background-color: #fff;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 32rpx;
	
		.shopJiaLeft {
			>view {
				display: flex;
				align-items: center;
	
				image {
					width: 44rpx;
					height: 44rpx;
					margin-right: 16rpx;
				}
	
				text {
					font-size: 28rpx;
					color: #323233;
				}
			}
	
			>view:first-child {
				margin-bottom: 20rpx;
				text {
					font-weight: bold;
				}
			}
			>view:last-child {
				margin-top: 20rpx;
			}
		}
	
		.shopJiaRight {
			image {
				width: 48rpx;
				height: 48rpx;
			}
		}
	}
</style>
